Data Types
Some commands require data of certain types. In cases where data is of the wrong type,
a conversion (also known as "casting") is attempted.
For example, <:include_file param> requires an FSSP for the parameter.
If the parameter is some other kinds of data, such as text, Flex-Able will
attempt to convert the text into an FSSP by interpreting it as a file path.
- TEXT
Most data in Flex-Able is text data. Almost any other kind of data
can be converted to text.
<:sizeof x> returns the number of characters in the text
- INTG
Integer data - nubers in the range of +/- 2.1 billion. Can be cast
to/from text freely.
<:sizeof x> returns 1
- FSSP
File specification. When TEXT is cast to FSSP, the text is
interpreted as a file path. You CAN NOT create an FSSP that
points outside of the virtual host of the current request.
eg: <:new "FSSP" "/file1"> creates an FSSP that points to
the file "file1" located in the root of the current virtual
host.
When echoed, an FSSP will only return the filename of that file.
We plan to provide a separate command to obtain document URIs.
<:sizeof x> returns 0 - it should probably return the filename
length
- ASOC
Associative Array. This is a complex data type that can contain
other kinds of data, including other ASOCs. Each item is indexed
by name. Hence myVar["item 1"] returns the data labeled
"item 1". When addressing a member of an ASOC, the index is cast
to type TEXT.
When echoed, an ASOC will return a comma-separated list enclosed
with {braces}. To get each item of an ASOC separately, use the
<:foreach> command.
<:sizeof x> returns the number of items in the array
- LIST
Ordered List. This is another complex data type that can contain
other kinds of data, including other LISTs. Each item is indexed
by number, with zero as the base index. Hence myVar[1] returns
the second member. When addressing a member of a LIST, the index
is cast to type INTG.
When echoed, an LIST will return a comma-separated list enclosed
with (parenthesis). To get each item of a LIST separately,
use the <:foreach> command.
<:sizeof x> returns the number of items in the LIST
back to Contents /
on to Environmental Variables